﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;

namespace SqlMiM.Common.Framework.UserInterfaces
{
    public class Theme
    {
        private bool isSystemTheme;
        private string name;
        private ResourceDictionary resourceDictionary;
        private string resourceName;


        public Theme(string name, string resourceName, bool isSystemTheme)
        {
            this.name = name;
            this.resourceName = resourceName;
            this.isSystemTheme = isSystemTheme;
            this.resourceDictionary = null;
        }

        public void Reset()
        {
            this.resourceDictionary = null;
        }

        // Properties
        public bool IsSystemTheme
        {
            get
            {
                return this.isSystemTheme;
            }
        }

        public string Name
        {
            get
            {
                return this.name;
            }
        }

        public ResourceDictionary ResourceDictionary
        {
            get
            {
                if (this.resourceDictionary == null)
                {
                    this.resourceDictionary = FileTable.GetResourceDictionary(this.resourceName);
                }
                return this.resourceDictionary;
            }
        }
    }

}
